<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bank</title>
    <script src="http://localhost:9019/js/jquery.min.js"></script>
    <script src="http://localhost:9019/js/guohu/check.js"></script>

</head>
<body>
    <form action="guohu_fenye.do">
    <table border="1" style="width: 1100px">
        <tr><td>交易时间</td><td colspan="5"><input type="text" placeholder="yyyy-MM-dd" name="transferDate" id="transferDate" th:value="${session.wmsTTransfer.getTransferDate()}">/<input type="text" placeholder="yyyy-MM-dd"  name="transferEditTime" id="transferEditTime" th:value="${session.wmsTTransfer.transferEditTime}"></td></tr>
        <tr><td>买家</td><td colspan="5"><input type="text"  name="transferBuyer" id="transferBuyer" th:value="${session.wmsTTransfer.transferBuyer}"></td></tr>
        <tr><td>卖家</td><td colspan="5"><input type="text"  name="transferVender" id="transferVender" th:value="${session.wmsTTransfer.transferVender}"></td></tr>
        <tr><td></td><td colspan="5"><button type="submit">查询</button></td></tr>
        <tr><td colspan="6">每页显示条数:<select name="pageRows" id="pageRows" onchange="nextpage(this.value)">
           <option th:each="list1:${session.list}" th:text="${list1}" th:value="${list1}" id="option" th:selected="${session.pageRows == list1}"></option>
        </select></td></tr>
        <tr><td colspan="1">过户单号</td><td colspan="1">买方</td><td colspan="1">卖方</td><td colspan="1">操作员</td><td colspan="1">过户时间</td><td colspan="1">最后编辑时间</td></tr>

    </table>
    </form>
    <label th:if="${session.pageInfo.size==0}" style="color: #ff4400">没有查到任何数据!请核对查询信息</label><br>
    <table  border="1" th:if="${session.pageInfo.size != 0}" style="width: 1100px">
        <tr th:each="list2:${session.pageInfo.getList()}">
            <td th:text="${list2.getTransferId()}" width="18%"></td>
            <td th:text="${list2.transferBuyer}" width="18%"></td>
            <td th:text="${list2.transferVender}" width="18%"></td>
            <td th:text="${list2.userId}" width="18%"></td >
            <td th:text="${list2.transferDate}" width="18%"></td>
            <td th:text="${list2.transferEditTime}" width="18%"></td>
        </tr>
    </table>
    <tr>
        <td><button id="last" th:value="${session.pageInfo.getPageNum()>1?session.pageInfo.getPageNum()-1:session.pageInfo.getPageNum()}" onclick="lastpage(this.value)">上一页</button>
        </td><td><button id="next" th:value="${session.pageInfo.getPageNum()<session.pageInfo.pages?session.pageInfo.getPageNum()+1:session.pageInfo.getPageNum()}" onclick="lastpage(this.value)">下一页</button></td>
    </tr>
</body>
<script type="text/javascript">
    function lastpage(pageNum1) {
        var transferDate = $("#transferDate").val();
        var transferEditTime = $("#transferEditTime").val();
        var transferBuyer = $("#transferBuyer").val();
        var transferVender = $("#transferVender").val();
        var pageRows = $("#pageRows").val();
        window.location = "guohu_fenye.do?transferDate="+transferDate+"&"+"transferEditTime="+transferEditTime+"&"+"transferBuyer="+transferBuyer+"&"+"transferVender="+transferVender+"&"+"pageNum2="+pageNum1+"&"+"pageRows2="+pageRows
    }

    function nextpage(row) {
        var transferDate = $("#transferDate").val();
        var transferEditTime = $("#transferEditTime").val();
        var transferBuyer = $("#transferBuyer").val();
        var transferVender = $("#transferVender").val();
        window.location = "guohu_fenye.do?transferDate="+transferDate+"&"+"transferEditTime="+transferEditTime+"&"+"transferBuyer="+transferBuyer+"&"+"transferVender="+transferVender+"&"+"pageRows2="+row
    }

</script>
</html>